import request from '../request'


//创建商品订单
export const createGoodsOrder = params => request.globalRequest(`aos/api/order/createOrder`, 'POST', params)

//创建医生订单 
export const createDoctorOrder = params => request.globalRequest(`aos/api/order/createDoctorOrder`, 'POST', params)

//发起微信支付
export const submitOrder = params => request.globalRequest(`aos/api/order/submitOrder`, 'GET', params)

//支付回调
export const updateOrderStatus = params => request.globalRequest(`aos/api/order/updateOrderStatus`, 'PUT', params)

//药品订单列表
export const queryDrugOrderList = params => request.globalRequest(`aos/api/commodityOrder/appList`, 'GET', params)

//药品订单详情
export const queryOrderDetail = params => request.globalRequest(`aos/api/order/orderDetail/${params.params.id}`, 'GET', params)

// 药品订单详情（新）
export const getMedicineOrderDetail = params => request.globalRequest(`aos/api/commodityOrder/appDetail`, 'GET', params)

// 取消订单
export const cancelMedicineOrder = params => request.globalRequest(`aos/api/commodityOrder/cancelOrder`, 'POST', params)

// 确认收货
export const confirmMedicineOrder = params => request.globalRequest(`aos/api/commodityOrder/app/confirmReceiving`, 'POST', params)

// 申请售后
export const requestAfterSale = params => request.globalRequest(`aos/api/aftersaleOrder/apply`, 'POST', params)

// 获取售后单详情
export const getAfterSaleDetail = params => request.globalRequest(`aos/api/aftersaleOrder/appDetail`, 'GET', params)

// 查询我的可用问诊券
export const getMyInquiryCoupons = params => request.globalRequest(`aos/coupon/info/getUsableQuestionCouponList`, 'GET', params)